<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>任务信息列表</title>
<#include "../include/base.ftl">
<script type="text/javascript" src="style/web/js/task.js?v=${version}"></script>
</head>
<body>
	<table id="task-entity-list-box" class="easyui-datagrid" style="width: 100%;"
		toolbar="#task-entity-list-btn" title="栏目信息列表" iconCls="icon-save"
			url="taskEntity/data" rownumbers="true" singleSelect=true
			pagination="true" pageSize=30 pageList=[30,40,50,100] pageNumber=1>
			<thead>
				<tr>
					<th field="ck" width="50" checkbox=true align="center">选择</th>
					<th field="id" width="40" hidden=true>ID</th>
                    <th field="taskId" width="200" align="center">任务ID</th>
                    <th field="taskName" width="200" align="center">任务名称</th>
                    <th field="cronExpression" width="300" align="center">执行表达式</th>
                    <th field="taskClass" width="300" align="center" formatter="formatTaskClass">线程类</th>
                    <th field="siteName" width="150" align="center">站点</th>
                    <th field="serverNode" width="150" align="center">运行节点</th>
                    <th field="params" width="150" align="center">运行参数</th>
                    <th field="status" width="100" formatter="formatStauts" align="center">当前状态</th>
                    <th field="operator" width="100" formatter="formatOperator" align="center">執行</th>
				</tr>
			</thead>
		</table>
	
		<div id="task-entity-list-btn" class="search-box">
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch()">查询</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:showAddBox();">新增</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-lock" plain="true" onclick="javascript:setTaskStatus(0);">冻结</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onclick="javascript:setTaskStatus(1);">启动</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:deleteTaskEntity();">刪除</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="javascript:showEditBox();">修改</a>
			<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-reload" plain="true" onclick="javascript:resetSearchForm();">重置</a>				
			<br/>
            <span class="search-label">任务ID:</span><input type="text" id="s-taskId" name="taskId" class="easyui-textbox search-input"/>	
            <span class="search-label">执行表达式:</span><input type="text" id="s-cronExpression" name="cronExpression" class="easyui-textbox search-input"/>	
            <span class="search-label">线程类:</span><input type="text" id="s-taskClass" name="taskClass" class="easyui-textbox search-input"/>	
            <span class="search-label">任务名称:</span><input type="text" id="s-taskName" name="taskName" class="easyui-textbox search-input"/>	
		</div>
	
		<div id="edit-task-entity-box" class="easyui-window add-box" title="栏目信息信息维护"
			style="width: 500px; height: 400px; display: none; left: 60px; top: 50px; background: #fafafa;"
		closed="true" modal="true" collapsible="false" minimizable="false"
			maximizable="false" draggable="false" resizable="false">
			<form action="taskEntity/save" method="post" id="edit-task-entity-form"
				autocomplete="off">
				<table class="form-table">
					<input type="hidden" id="id" name="id">
					<input type="hidden" id="siteName" name="siteName">
                   <tr>
		    			<th align="right">任务ID</th>
		    			<td>
		    				<input type="text" id="taskId" name="taskId" class="easyui-textbox add-input"/>
		    			</td>
		    		</tr>
                   <tr>
		    			<th align="right">执行表达式</th>
		    			<td>
		    				<input type="text" id="cronExpression" name="cronExpression" class="easyui-textbox add-input"/>
		    			</td>
		    		</tr>
                   <tr>
		    			<th align="right">线程类</th>
		    			<td>
		    				<!-- <input type="text" id="taskClass" name="taskClass" class="easyui-textbox add-input"/> -->
		    				<select id="taskClass" name="taskClass" class="easyui-combobox add-input" editable="false"></select>
		    			</td>
		    		</tr>
                   <tr>
		    			<th align="right">任务名称</th>
		    			<td>
		    				<input type="text" id="taskName" name="taskName" class="easyui-textbox add-input"/>
		    			</td>
		    		</tr>
		    		<tr>
		    			<th align="right">指定站点</th>
		    			<td>
		    				<select id="editSite" name="siteId" class="easyui-combobox add-input" url="commonApi/site" textField="name" valueField="id" editable="false"></select>
		    			</td>
		    		</tr>
		    		<tr>
		    			<th align="right">运行节点</th>
		    			<td>
		    				<select id="serverNode" name="serverNode" class="easyui-textbox add-input wid200"></select>
		    			</td>
		    		</tr>
		    	    <tr>
		    			<th align="right">运行参数</th>
		    			<td>
		    				<input type="text" id="params" name="params" class="easyui-textbox add-input wid200"/>
		    			</td>
		    		</tr>
				</table>
				<br />
				<div class="form-buttons">
					<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" onclick="javascript:submitSaveTaskEntity();">提交</a>&nbsp;&nbsp;&nbsp;
					<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#edit-task-entity-box').dialog('close');">关闭</a>
				</div>
		</form>
	</div>
</body>
</html>
